package com.prs.crm.dao.assets.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import com.prs.crm.dao.assets.AssetsSmallClassDao;
import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.domain.assets.AssetsSmallClass;

public class AssetsSmallClassDaoImpl extends BaseDaoImpl<AssetsSmallClass> 
					implements AssetsSmallClassDao{

	@Override
	public List<AssetsSmallClass> getAllSmallClass() {
		Criteria cri = this.getSession().createCriteria(AssetsSmallClass.class);
		return cri.list();
	}

	@Override
	public List<AssetsSmallClass> getAllSmallClassByBigId(Integer bigid) {
		Criteria cri = this.getSession().createCriteria(AssetsSmallClass.class);
		cri.add(Restrictions.eq("assetsBigClass.id", bigid));
		return cri.list();
	}
	
}
